import java.util.Vector;

public class EneryTank extends Tank implements Runnable{
    EneryTank(int x,int y){
        super(x,y);
        this.setKind(2);
        this.setSpeed(15);
    }

    @Override
    public void run() {
        while (true) {
            int i;
            label94:
            switch (this.getDir()) {
                case 0:
                    i = 0;

                    while (true) {
                        if (i >= 30) {
                            break label94;
                        }

                        this.up();

                        try {
                            Thread.sleep(50L);
                        } catch (InterruptedException var6) {
                            throw new RuntimeException(var6);
                        }

                        ++i;
                    }
                case 1:
                    i = 0;

                    while (true) {
                        if (i >= 30) {
                            break label94;
                        }

                        this.down();

                        try {
                            Thread.sleep(50L);
                        } catch (InterruptedException var5) {
                            throw new RuntimeException(var5);
                        }

                        ++i;
                    }
                case 2:
                    i = 0;
                    while (true) {
                        if (i >= 30) {
                            break label94;
                        }

                        this.left();

                        try {
                            Thread.sleep(50L);
                        } catch (InterruptedException var5) {
                            throw new RuntimeException(var5);
                        }

                        ++i;
                    }
                case 3:
                    i = 0;
                    while (true) {
                        if (i >= 30) {
                            break label94;
                        }

                        this.right();

                        try {
                            Thread.sleep(50L);
                        } catch (InterruptedException var5) {
                            throw new RuntimeException(var5);
                        }

                        ++i;
                    }
            }
            this.setDir((int)(Math.random()*4));
        }
    }
    Vector<Bullet> bulletVector=new Vector();
    Bullet bullet = null;

}
